package LuoGu.递归_递推.数的计算;

import java.util.Scanner;

public class Main {
    //递推，算是dp吧
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int [] dp = new int [1001];
        dp[1] = 1;
        for(int i=2;i<1001;i++){
            for(int j=1;j<=i/2;j++){
                dp[i] += dp[j];
            }
            dp[i]++;
        }
        System.out.print(dp[n]);
    }
}
